using Microsoft.VisualBasic;
using MySql.Data.MySqlClient;
using Org.BouncyCastle.Asn1.Cmp;

namespace 十站联竞职员平台
{
    public partial class Login : Form
    {


        Database conn;

        public Login(Database mySql)
        {
            this.conn = mySql;

            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {


        }

        private void panel1_Paint(object sender, PaintEventArgs e)
        {

        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (this.conn.Login(User.Text,Pass.Text) == true)
            {
                Form2 form2 = new Form2(conn);

                form2.ShowDialog();

                this.Dispose();//关闭登录窗口
            }
            else
            {
                MessageBox.Show("登陆失败！用户名或密码错误！");
            }
        }
    }
}